<div id="<%= active_scaffold_id -%>" class="active-scaffold active-scaffold-<%= controller_id %> <%= active_scaffold_config.theme %>-theme">
  <div class="active-scaffold-header">
    <%= render :partial => 'list_header' %>
  </div>
  <table cellpadding="0" cellspacing="0">
    <tbody class="before-header" id="<%= before_header_id -%>"></tbody>
  </table>
  <div id="<%= active_scaffold_content_id -%>">
    <%= render :partial => 'list' %>
  </div>
</div>

<script type="text/javascript">
<% if active_scaffold_config.theme != :default %>
Rico.Corner.round($$('#<%= active_scaffold_id %> div.active-scaffold-header').first(), {color: 'fromElement', bgColor: 'fromParent', corners: 'top', compact: true});
Rico.Corner.round($$('#<%= active_scaffold_id %> div.active-scaffold-footer').first(), {color: 'fromElement', bgColor: 'fromParent', corners: 'bottom', compact: true});
<% end %>
new ActiveScaffold.Actions.Table($$('#<%= active_scaffold_id -%> div.active-scaffold-header a.action'), $('<%= before_header_id -%>'), $('<%= loading_indicator_id(:action => :table) -%>'))
ActiveScaffold.server_error_response = '<p class="error-message message">'
  + <%= as_('Request Failed (code 500, Internal Error)').to_json %>
  + '<a href="#" onclick="Element.remove(this.parentNode); return false;">'
  + <%= as_('Close').to_json %>
  + '</a>'
  + '</p>';
</script>
